#!/bin/bash
argNums=$#
if [ $argNums -eq 2 ]
then
    filePath=$1
    password=$2
    ./transfer cow --password $password $filePath
elif [ $argNums -eq 3 ]
then
    filePath=$1
    password=$2
    outPath=$3
    ./transfer cow --password $password $filePath -o $outPath
else
    echo "参数有误"
    echo "使用格式:sh ./download.sh {filePath} {password}"
    echo "使用示例:sh ./download.sh https://cowtransfer.com/s/24e4156407cd4b nhkann"
    echo "=========================="
    echo "warning:不要下载文件夹"
    # echo "下载文件夹"
    # echo "使用格式:sh ./download.sh {filePath} {password} {outputPath_dir}"
    # echo "使用示例:sh ./download.sh https://cowtransfer.com/s/24e4156407cd4b /home/adept/test_download"
    echo "=========================="
    echo "奶牛快传网址: https://cowtransfer.com/"
fi

